<?php
/**
 * Created by PhpStorm.
 * User: Inhere
 * Date: 2015/3/4
 * Time: 19:44
 * Use : 索引键信息
 * KEY ('id','gid')
 *   array(
 *       'type'     => 'KEY',
 *       'name'     => null,
 *       'columns'  => array('id','gid'),
 *       'comment'  => 'this a comment'
 *    );
 * File: IndexKey.php
 */

namespace ulue\core\db\base\schema;

use ulue\core\abstracts\AbstractCore;

class IndexKey extends AbstractCore
{
    /**
     * @var string
     */
    const TYPE_UNIQUE = 'unique';

    /**
     * @var string
     */
    const TYPE_INDEX = 'index';

    /**
     * @var string
     */
    const TYPE_PRIMARY = 'primary';

    /**
     * Property type.
     * @var string
     */
    public $type = null;

    /**
     * Property name.
     * @var string
     */
    public $name = null;

    /**
     * Property columns. 当前类型的索引键 有哪些列(字段)
     * @var array
     */
    public $columns = [];

    /**
     * Property comment.
     * @var string
     */
    public $comment = '';

}// end class IndexKey